import request from '@/utils/request'
export default {
    //根据课程id获取章节和小节数据列表
    getAllChapterVideo(courseId){
         return request({
            url:'/eduservice/educhapter/nestedlist/'+courseId,
            method:'get'
        })
    },
    //添加章节和小节数据列表
    addChapterList(chapter){
        return request({
           url:'/eduservice/educhapter/addChapter',
           method:'post',
           data:chapter
       })
    },
    //根据id获取章节和小节数据列表
    getChapterVideoByChapterId(chapterId){
        return request({
           url:'/eduservice/educhapter/getChapterInfoById/'+chapterId,
           method:'get'
       })
   },
   //修改章节和小节数据列表
   updateChapterVideo(chapter){
        return request({
        url:'/eduservice/educhapter/updateChapter',
        method:'post',
        data:chapter
        })
    },
    //删除章节通过id
   deleteChapterById(chapterId){
    return request({
        url:'/eduservice/educhapter/removeChapterById/'+chapterId,
        method:'delete'
    })
    }
}
